/*
 * CommandFactory.cpp
 *
 *  Created on: Oct 21, 2008
 *      Author: Ryan
 */
#include "CommandFactory.h"

#include "../Commands/AttackCommand.h"
#include "../Commands/BuildCommand.h"
#include "../Commands/BuildUnitCommand.h"
#include "../Commands/CaptureCommand.h"
#include "../Commands/GuardCommand.h"
#include "../Commands/LoadCommand.h"
#include "../Commands/UnloadCommand.h"
#include "../Commands/ReclaimCommand.h"
#include "../Commands/RepairCommand.h"
#include "../Commands/MoveCommand.h"
#include "../Commands/PatrolCommand.h"
#include "../Commands/QueuedCommand.h"
#include "../Commands/StopCommand.h"

namespace OOInterface {

ConstCommandPtr CommandFactory::createAttackCommand( ConstUnitPtr attackee )
{
	return ConstCommandPtr( new AttackCommand( attackee ) );
}

ConstCommandPtr CommandFactory::createBuildCommand( ConstUnitPtr building, const Point3f& location, const Direction& facing )
{
	return ConstCommandPtr( new BuildCommand( building, location, facing ) );
}

ConstCommandPtr CommandFactory::createBuildUnitCommand( ConstUnitPtr unit )
{
	return ConstCommandPtr( new BuildUnitCommand( unit ) );
}

ConstCommandPtr CommandFactory::createCaptureCommand( ConstUnitPtr unit )
{
	return ConstCommandPtr( new CaptureCommand( unit ) );
}

ConstCommandPtr CommandFactory::createGuardCommand( ConstUnitPtr unit )
{
	return ConstCommandPtr( new GuardCommand( unit ) );
}

ConstCommandPtr CommandFactory::createLoadCommand( ConstUnitPtr unit )
{
	return ConstCommandPtr( new LoadCommand( unit ) );
}

ConstCommandPtr CommandFactory::createUnloadCommand( const Point3f& loc )
{
	return ConstCommandPtr( new UnloadCommand( loc ) );
}

ConstCommandPtr CommandFactory::createReclaimCommand( ConstUnitPtr unit )
{
	return ConstCommandPtr( new ReclaimCommand( unit ) );
}

ConstCommandPtr CommandFactory::createRepairCommand( ConstUnitPtr unit )
{
	return ConstCommandPtr( new RepairCommand( unit ) );
}

ConstCommandPtr CommandFactory::createMoveCommand( const Point3f& location )
{
	return ConstCommandPtr( new MoveCommand( location ) );
}

ConstCommandPtr CommandFactory::createPatrolCommand( const Point3f& location )
{
	return ConstCommandPtr( new PatrolCommand( location ) );
}

ConstCommandPtr CommandFactory::createQueuedCommand( ConstCommandPtr command )
{
	return ConstCommandPtr( new QueuedCommand( command ) );
}

ConstCommandPtr CommandFactory::createStopCommand()
{
	return ConstCommandPtr( new StopCommand() );
}

}


